Repository navigation
[BREAKING] Add OptableIdentifier.raw for pre-encoded identifiers - #98
Open
jrosendahl-opt wants to merge 2 commits into
Open
jrosendahl-opt wants to merge 2 commits into
jrosendahl-opt wants to merge 2 commits into
Conversation
.raw("type:value") lets apps send identifier types that have no case,
like the Android SDK's Raw. A known type is checked and normalized like
its case, so "e" and "p" values must already be SHA256 digests and a
plaintext Email or Phone number is never sent. An unknown type is sent
as given, and values missing a type or value are dropped.
Targeting hids now skip identifiers that encode to an empty string, as
ids already did, instead of sending an empty hid=.
Adding a case to the public OptableIdentifier enum breaks exhaustive
switches in apps, so this is for 2.0.0.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 10, 2026
Open
An unknown type with a whitespace-only value, like "xyz: ", was sent as given. It's now dropped, matching #99, which drops typed identifiers that are empty after normalization. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
iOS apps can only send identifier types that have an
OptableIdentifiercase, so a new DCN identifier type needs an SDK release first. The Android SDK already accepts pre-encoded"type:value"strings throughOptableIdentifier.Raw. Part of 2.0.0. Don't merge until 1.4.0, the last CocoaPods release, has shipped.What Changed
OptableIdentifier.raw(String)taking a pre-encoded"type:value".eandpvalues must already be SHA-256 digests, like.hemand.hashedPhoneNumber, so a plaintext Email or Phone number is dropped and never sent. Android'sRawsends these unchecked.prefixreturns the type part.OptableIdentifier(extendedIdentifier:)is unchanged and still returns nil for unknown types; arbitrary types only come from an explicit.raw.hidsnow skip identifiers that encode to an empty string, asidsalready did. Before, a dropped.hem(and now.raw) went out as an emptyhid=.How to Test
bundle exec fastlane testspasses (ran the suite on an iPhone 17 Pro simulator)e:/p:rejected; malformed values dropped;prefix; targetingid/hidwith raw and rejected valuesNotes
Breaking: adding a case to the public
OptableIdentifierenum breaksswitchstatements in apps that don't have adefault.Follow-up after [BREAKING] Port OptableSDKIdentifier to Swift so SPM ships the Objective-C API #84: an Objective-C raw type (
OptableSDKIdentifierType), and the same docs section in the Objective-C guide.Breaking change
Requires release
🤖 Generated with Claude Code